package com.group.library.order.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.group.library.order.dao.ReportMapper;
import com.group.library.order.entity.Report;
import com.group.library.order.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReportServiceImpl implements ReportService {

    @Autowired
    private ReportMapper reportMapper;

    @Override
    public PageInfo<Report> findReport(Integer page, Integer limit, String name, String number) {
        PageHelper.startPage(page,limit);
        List<Report> reports = reportMapper.findReport(name, number);
        System.out.println("reports-->"+reports);
        return new PageInfo<Report>(reports);
    }
}
